package kr.co.goodwilldd.framework.service.impl;

import javax.annotation.PostConstruct;

import kr.co.goodwilldd.framework.repository.DefaultRepository;
import kr.co.goodwilldd.framework.service.ISiteService;

import org.springframework.beans.factory.annotation.Autowired;

public class SiteServiceImpl implements ISiteService {

	@Autowired
	DefaultRepository defaultRepository;
	
	@Override
	@PostConstruct
	public void init() {
		
	}

	@Override
	public void siteInit() {
		defaultRepository.doDropALL();
		defaultRepository.doCreateTableAuth();
		defaultRepository.doCreateTableAuthRole();
		defaultRepository.doCreateTableBoard();
		defaultRepository.doCreateTableFile();
		defaultRepository.doCreateTableMenus();
		defaultRepository.doCreateSequenceBoard();
		defaultRepository.doCreateSequenceFile();
		defaultRepository.doCreateSequenceMenu();
		defaultRepository.doCreateIndexBoardSeq();
		defaultRepository.doCreateIndexBoardSubject();
		defaultRepository.doCreateUniqueIndexAuthRole();
		defaultRepository.doCreateUniqueIndexBoard();
	}

}
